import Components from 'unplugin-vue-components/vite'
import { TinyVueResolver } from '@opentiny/unplugin-tiny-vue'
import IconsResolver from 'unplugin-icons/resolver'
export default () => {
  return Components({
    resolvers: [
      TinyVueResolver,
      // 自动注册图标组件
      IconsResolver({
        // 图标库，其他图标库 https://icon-sets.iconify.design/
        enabledCollections: ['ep']
      })
    ],
    // 指定自定义组件位置(默认:src/components)
    dirs: ['src/components', 'src/**/components', 'src/**/container', 'src/**/components/**/*.vue', 'src/**/container/**/*.vue'],
    // 指定自动导入组件TS类型声明文件路径 (false:关闭自动生成)
    // dts: false
    dts: 'src/typings/auto-components.d.ts'
  })
}
